package com.base.mapper.voipmapper;

import com.base.po.sqlparam.ShopOrderExamplePage;
import com.base.po.voip.ShopOrder;
import com.base.po.voip.ShopOrderExample;
import com.base.utils.Page;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface ShopOrderMapper {
    int countByExample(ShopOrderExample example);

    int deleteByExample(ShopOrderExample example);

    int deleteByPrimaryKey(String id);

    int insert(ShopOrder record);

    int insertSelective(ShopOrder record);

    List<ShopOrder> selectByExample(ShopOrderExample example);

    List<ShopOrder> selectByExamplePage(ShopOrderExamplePage example);

    ShopOrder selectByPrimaryKey(String id);

    ShopOrder selectByOrdernum(String ordernum);

    int selectByCountSO(@Param("tmid") String tmid, @Param("subid") String subid);

    int updateByExampleSelective(@Param("record") ShopOrder record, @Param("example") ShopOrderExample example);

    int updateByExample(@Param("record") ShopOrder record, @Param("example") ShopOrderExample example);

    int updateByPrimaryKeySelective(ShopOrder record);

    int updateByPrimaryKey(ShopOrder record);

    // 搜索分页
    int countByAll(@Param("ordernum") String ordernum, @Param("mobile") String mobile,
                   @Param("parentid") String parentid,  @Param("statusFrom") Integer statusFrom,
                   @Param("statusTo") Integer statusTo);

    List<ShopOrder> selectByAll(@Param("page") Page page, @Param("ordernum") String ordernum,
                                @Param("mobile") String mobile, @Param("parentid") String parentid,
                                @Param("statusFrom") Integer statusFrom, @Param("statusTo") Integer statusTo);

    ShopOrder selectByXgt(@Param("subid") String subid, @Param("parentid") String parentid, @Param("cid") String cid);

    int selectByXgt2(@Param("subid") String subid, @Param("parentid") String parentid, @Param("cid") String cid);

    int updateByXgt(String id);
}